<?php
/**
 * 登录页面
 *
 * @author Alen
 * @since 1.0.0 2013-10-3 sutroon
 */
class LoginAction extends SoAction {
    //put your code here
    public function index(){
        $this->assign('u',request_string('u'));
        $this->assign('c',request_string('c'));
        $this->display();
    }
    public function login(){
        $biz=new SoBizUser(true);
        $msg=$biz->login_admin(request_string('UserName'),request_string('Password'));
        if($msg=='SUCCESS'){
            redirect('登录成功','?m=Index');
        }else{
            timer_die_or_redirect($msg,'logincount','?m=Login&r=fail');
        }
    }
    
    public function loginout(){
        $biz=new SoBizUser();
        $biz->login_out();
        $this->assign('u',request_string('u'));
        $this->assign('c',request_string('c'));
        $this->display();
}  

    }
?>
